package com.mdsi.models;

import java.util.Calendar;
import java.util.HashSet;
import java.util.Set;

public class Student extends Person {
	
	private Long number ;
	public Long getNumber () { return this.number ; }
	
	private Calendar birthdate ;
	public Calendar getBirthdate () { return this.birthdate ; }
	
	private String nationality ;
	public String getNationality () { return this.nationality ; }
	
	private Set <Absence> absences ;
	public Set <Absence> getAbsences () { return this.absences ; }
	protected void addAbsence (Absence a) { 
		this.absences.add(a) ;
	}
	public void cleanAbsence () {
		absences = new HashSet <Absence> () ;
	}
		
	public Student (Long id, String firstname, String lastname, String email, Long number, Calendar birthdate, String nationality) {
		super(id, firstname, lastname, email, null) ;
		this.absences = new HashSet <Absence> () ;
		this.number = number ;
		this.birthdate = birthdate ;
		this.nationality = nationality ;
	}
	
}
